<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Collect_message</title>
    <style>
        .stuCollect {
            width: 100%;
            height: 80px;
            border-bottom: 1px black solid;
        }

        .layui-input {
            border: none;
            outline: none;
        }

        .left {
            float: left;
        }

        .right {
            float: right;
        }
    </style>
</head>
<body>
<div>
    <div th:each="collectMessageList: ${collectMessageList}">
        <div class="stuCollect">
            <div class="left">
                <label class="layui-form-label" for="message"></label>
                <div class="layui-input-inline">
                    <input class="layui-input" id="message" name="message"
                           th:value="${collectMessageList.partTimeMessage.message}"
                           type="text" value="">
                </div>
            </div>
            <div class="right">
                <label class="layui-form-label" for="collect_time"></label>
                <div class="layui-input-inline">
                    <input class="layui-input" id="collect_time" name="collect_time"
                           th:value="${#dates.format(collectMessageList.collectTime,'yyyy-MM-dd HH:mm:ss')}"
                           type="text" value="">
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    window.onload = function () {
        const input = document.getElementsByClassName("layui-input");
        for (let i = 0; i < input.length; i++) {
            input[i].setAttribute('readonly', 'true');
        }
    }
</script>
</body>
</html>